hysop.operator.directional.directional module¶
- class hysop.operator.directional.directional.DirectionalOperatorBase(splitting_dim, splitting_direction, dt_coeff, **kwds)[source]¶
Bases:
object
Implementation interface for directional operators.
Create a directional operator in a given direction.
- Parameters:
splitting_direction (int) – Direction of this operator.
splitting_dim – The dimension of the splitting.
dt_coeff – Coefficient that should be applied on simulation timestep.
- class hysop.operator.directional.directional.DirectionalOperatorFrontend(implementation=None, base_kwds=None, **op_kwds)[source]¶
Bases:
DirectionalOperatorGenerator
Frontend facility for directional operators that provide multiple implementations.
Initialize a DirectionalOperatorFrontend.
- Parameters:
implementation (Implementation, optional, defaults to None) – target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().
base_kwds (dict, optional, defaults to None) – Base class keywords arguments. If None, an empty dict will be passed.
op_kwds – Keywords arguments that will be passed towards implementation implemention __init__ during a call to _generate. In addition to those arguments, direction and splitting_dim will also be passed.
candidate_input_tensors (tuple of fields, optional) – Candidate input tensor fields that should be rebuilt at discretization. ScalarFields are filtered out.
candidate_output_tensors (tuple of fields, optional) – Candidate output tensor fields that should be rebuilt at discretization. ScalarFields are filtered out.
- implementation¶
the implementation implementation
- Type:
Implementation
- abstract default_implementation()[source]¶
Return the default Implementation, should be compatible with available_implementations.
- property generated¶
- class hysop.operator.directional.directional.DirectionalOperatorGenerator(operator, base_kwds, candidate_input_tensors, candidate_output_tensors, name=None, pretty_name=None, **op_kwds)[source]¶
Bases:
DirectionalOperatorGeneratorI
Simple ComputationalGraphNodeGenerator to generate an operator in multiple directions.
Initialize a DirectionalOperatorGenerator.
- Parameters:
operator (ComputationalGraphNodeGenerator or ComputationalGraphNode) – operator class to be built in each direction. operator.__init__ should accept all extra keywords arguments op_kwds + ‘direction’ + ‘splitting_dim’ + ‘name’
base_kwds (dict, optional, defaults to None) – Base class keywords arguments. If None, an empty dict will be passed.
op_kwds – Keywords arguments that will be passed towards operator.__init__ during a call to _generate. In addition to those arguments, direction and splitting_dim will also be passed.
candidate_input_tensors (tuple of fields, optional) – Input tensor fields that should be rebuilt at discretization. ScalarFields are filtered out.
candidate_output_tensors (tuple of fields, optional) – Output tensor fields that should be rebuilt at discretization. ScalarFields are filtered out.
- custom_directional_kwds(i)[source]¶
Specify custom keyword arguments that will be passed only for direction i.
- dump_inputs(fields=None, io_params=None, directions=None, **kwds)[source]¶
Tell this operator to dump some of its inputs before apply is called. Target folder, file, dump frequency and other io pameters are passed through io_params.